package com.team.work.dao;

import com.team.work.entities.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends JpaRepository<Comment, Long> {

    //把父级评论找出来即可
    //是父级评论是空的
    List<Comment> findByNewsIdAndParentCommentNull(Long newId, Sort sort);

}
